//package com.hippo.provider.controller.rule;
//
//import com.alibaba.fastjson.JSON;
//import com.hippo.core.pojo.dto.RuleDTO;
//import com.hippo.core.pojo.vo.result.BaseResult;
//import com.hippo.drools.utils.ReloadDroolsRules;
//import com.hippo.drools.utils.KieUtils;
//import com.hippo.provider.service.RuleEngineService;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.RequiredArgsConstructor;
//import org.kie.api.runtime.rule.FactHandle;
//import org.springframework.util.CollectionUtils;
//import org.springframework.util.StringUtils;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * @ClassName RuleController
// * @Description TODO 规则引擎测试类
// * @Author tangxl
// * @create 2023-05-08 11:29
// **/
//@RestController
//@RequestMapping("/rule")
//@RequiredArgsConstructor
//@Tag(name = "规则引擎管理", description = "规则引擎管理")
//public class RuleController {
//    private final RuleEngineService ruleEngineService;
//    private final ReloadDroolsRules reloadDroolsRules;
//
//    @Operation(summary = "添加Fact对象校验")
//    @PostMapping("/param")
//    public BaseResult param (@RequestBody List<RuleDTO> ruleDTOList){
//        return ruleEngineService.param(ruleDTOList);
//    }
//
//    @Operation(summary = "规则引擎重载")
//    @GetMapping("/reload")
//    public BaseResult reload (String ruleName) throws Exception {
//        // 返参
//        reloadDroolsRules.reload(ruleName);
//        return BaseResult.ok("新规则重载成功");
//    }
//
//}
